package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.GasListInfoEntity;
import com.sgb.kjwl.model.entity.GasStationInfo;
import com.sgb.kjwl.model.entity.GasStationInfoEntity;
import com.sgb.kjwl.model.entity.OilInfoEntity;
import com.sgb.kjwl.model.entity.pricecheck.AttributeViewEntity;
import com.sgb.kjwl.model.entity.pricecheck.CommonStAttrEntity;
import com.sgb.kjwl.model.entity.pricecheck.EnquirySearchCompany;
import com.sgb.kjwl.model.entity.pricecheck.PriceCheckEntity;
import com.sgb.kjwl.model.entity.pricecheck.PriceCheckListEntity;
import com.sgb.kjwl.model.entity.pricecheck.SupplierEntitiy;
import com.sgb.kjwl.model.entity.self.BargainerBargainingEntity;
import com.sgb.kjwl.model.entity.self.BargainingEntity;
import com.sgb.kjwl.model.entity.self.BooleanEntity;
import com.sgb.kjwl.model.entity.self.BusinessOpportunitySubscriptionEntity;
import com.sgb.kjwl.model.entity.self.BusinessSubscribeEntity;
import com.sgb.kjwl.model.entity.self.CarMasterOderEntity;
import com.sgb.kjwl.model.entity.self.CargoManageEntity;
import com.sgb.kjwl.model.entity.self.CarriageBusinessEntity;
import com.sgb.kjwl.model.entity.self.CarriageInfoPublishEntity;
import com.sgb.kjwl.model.entity.self.CarriageManageEntity;
import com.sgb.kjwl.model.entity.self.CarriageSelectEntity;
import com.sgb.kjwl.model.entity.self.GoodsSelectEntity;
import com.sgb.kjwl.model.entity.self.MyOfferEntity;
import com.sgb.kjwl.model.entity.self.OfferDetailsEntity;
import com.sgb.kjwl.model.entity.self.OfferEntity;
import com.sgb.kjwl.model.entity.self.OrderQuoteEntity;
import com.sgb.kjwl.model.entity.self.OfferOwnerEntiy;
import com.sgb.kjwl.model.entity.self.OwnPathEntity;
import com.sgb.kjwl.model.entity.self.ReleaseGoodsEntity;
import com.sgb.kjwl.model.entity.self.RunningCityPEntity;
import com.sgb.kjwl.model.entity.self.SubSetEntity;
import com.sgb.kjwl.model.entity.self.TransportOrderEntity;
import com.sgb.kjwl.model.entity.self.TruckApplyEntity;
import com.sgb.kjwl.model.entity.shopping.ShopInfoPublishEntity;
import com.sgb.kjwl.model.entity.shopping.ShopMyPriceListEntity;
import com.sgb.kjwl.model.entity.shopping.ShopPriceInfo;
import com.sgb.kjwl.model.entity.transport.GoodsInfoTypeEntity3;
import com.sgb.kjwl.model.entity.transport.MapGoodsBiddingEntity;
import com.swgk.core.base.model.entity.H5ReEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.sgb.kjwl.model.response.ListResponse2;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by cfk on 2020/7/1.
 * 个人中心车主
 */

public interface SelfOwnerAPI {


    //货源管理  删除的接口
    @FormUrlEncoded
    @POST("v1/app/user/logistics/goodsSourceDel")
    Call<BaseEntity> goodsSourceDel(@Field("id") String id);


    //运输订单 详情  H5     7/21
    @FormUrlEncoded
    @POST("v1/app/common/getUrlSetting")
    Call<BaseEntity<H5ReEntity>> getUrlSetting(@Field("param") String param);


    //议价  7/20   货主
    @POST("v1/app/logistics/order/counterOffer")
    Call<BaseEntity> counterOffer(@Body MapGoodsBiddingEntity entity);

    //下单  7/20   货主
    @POST("v1/app/logistics/order/placeOrder")
    Call<BaseEntity> placeOrder(@Body MapGoodsBiddingEntity entity);


    //选择货源  ( 已发布的货源信息 )   7/20 （md）
    @POST("v1/app/logistics/order/getMyGoodsSourceList")
    Call<BaseEntity<ListResponse<List<MapGoodsBiddingEntity>>>> myGoodsSourceList(@Body Map map);


    //报价车主-列表     7/17 （md）
    @FormUrlEncoded
    @POST("v1/app/user/logistics/quotationOwner")
    Call<BaseEntity<ListResponse<List<OfferOwnerEntiy>>>> myOfferOwnerList(@Field("limit") int limit, @Field("page") int page, @Field("goodsSourceNo") String goodsSourceNo);

    //报价车主列表（2.0.2.3）
    @POST("logistics/my/operateQuoteOwner")
    Call<BaseEntity<ListResponse2<List<OrderQuoteEntity>>>> getOfferOwnerList(@Body Map map);

    //货主同意报价
    @POST("logistics/my/operateConfirmOffer")
    Call<BaseEntity> shipperAgreeOffer(@Body Map map);

    //报价车主详情（2.0.2.3）
//    @FormUrlEncoded
    @POST("logistics/my/operateQuoteOwnerDetail")
//    Call<BaseEntity<OfferOwnerDetailsEntity>> getOfferOwnerDetails(@Field("goodsOfferNo") String offerNo);
    Call<BaseEntity<OfferDetailsEntity>> getOfferOwnerDetails(@Body Map map);

    //货车报名
    @POST("logistics/my/getAllDriverOfferList")
    Call<BaseEntity<ListResponse<List<TruckApplyEntity>>>> getApplyTruckList(@Body Map map);

    //货主运输订单管理-列表     7/13 （md）
    @POST("v1/app/logistics/order/findGoodsOrderList")
    Call<BaseEntity<ListResponse<List<TransportOrderEntity>>>> myTransportOrderList(@Body Map map);


    //我的议价-列表     7/13 （md）
    @POST("v1/app/logistics/order/counterOfferList")
    Call<BaseEntity<ListResponse<List<BargainingEntity>>>> myBargainingList(@Body Map map);


    //承运商机-列表     7/13 （md）
    @POST("v1/app/user/logistics/myCarrierBusiness")
    Call<BaseEntity<ListResponse<List<CarriageBusinessEntity>>>> myCarriageBusinessList(@Body Map map);


    //发布货源 提交上传数据 7/13(md)
    @POST("v1/app/user/logistics/goodsSourcePublish")
    Call<BaseEntity> releaseGoodsSubmit(@Body ReleaseGoodsEntity releaseGoodsEntity);


    //装卸方式7/11（md）
    @POST("v1/app/user/logistics/handleType")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getHandleType();


    //货物类型  7/9 (md)
    @POST("v1/app/user/logistics/goodsType")
    Call<BaseEntity<List<GoodsSelectEntity>>> goodsType();


    //获取车型车长
    @POST("logistics/my/carTypesByGoodsType")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getCarTypeAndLen(@Body Map map);


    //货源-列表   货源管理  7/8 （md）
    @POST("v1/app/user/logistics/goodsSourceList")
    Call<BaseEntity<ListResponse<List<CargoManageEntity>>>> myCargoManageList(@Body Map map);


    @POST("v1/app/user/logistics/myCarrierList")
        //临时熟悉流程写的  接口是按照下面写的  7/2
    Call<BaseEntity<ListResponse<List<CarriageManageEntity>>>> myBargainingList();


    //承运管理列表
    @FormUrlEncoded
    @POST("v1/app/user/logistics/myCarrierList")
    Call<BaseEntity<ListResponse<List<CarriageManageEntity>>>> myCarrierList(@Field("limit") int limit, @Field("page") int page);

    //历史承运列表
    @POST("logistics/my/operateMoreHistory")
    Call<BaseEntity<ListResponse<List<CarriageInfoPublishEntity>>>> myCarrierHistoryList(@Body Map map);
//    Call<BaseEntity<ListResponse<List<CarriageManageEntity>>>> myCarrierHistoryList(@Body Map map);

    //推送承运 上传提交
    @POST("logistics/my/operatePushCarrier")
    Call<BaseEntity<String>> carrierPushCarrier(@Body Map map);

    //我的车型
    @POST("v1/app/user/logistics/carType")
    Call<BaseEntity<List<CarriageSelectEntity>>> carType();

    //我的车长
    @POST("v1/app/user/logistics/carLenType")
    Call<BaseEntity<List<CarriageSelectEntity>>> carLenType();

    //发票要求
    @POST("v1/app/user/logistics/invoiceType")
    Call<BaseEntity<List<CarriageSelectEntity>>> invoiceType();

    //    货源订阅-列表
    @FormUrlEncoded
    @POST("v1/app/user/logistics/myGoodsBusiness")
    Call<BaseEntity<ListResponse<List<BusinessOpportunitySubscriptionEntity>>>> myGoodsBusiness(@Field("limit") int limit, @Field("page") int page);

    //货源订阅列表(2.0.2.3)
    @POST("logistics/my/operateGoodsSubscription")
    Call<BaseEntity<ListResponse<List<BusinessSubscribeEntity>>>> getSupplyGoods(@Body Map map);

    //我的路线列表
    @POST("logistics/my/goodsBusinessList")
    Call<BaseEntity<ListResponse<List<OwnPathEntity>>>> getMyPaths(@Body Map map);

    //新增/编辑路线
    @POST("logistics/my/operateSetGoodsSubscription")
    Call<BaseEntity<BooleanEntity>> addOrEditPaths(@Body OwnPathEntity entity);

    //单条路线数据操作（开启/禁用,删除）
    @POST("logistics/my/goodsBusinessSet")
    Call<BaseEntity> deletePath(@Body Map map);

    //车主-报价
    @POST("v1/app/user/logistics/goodsOffer")
    Call<BaseEntity> goodsOffer(@Body OfferEntity offerEntity);

    //商机订阅-设置
    @POST("v1/app/user/logistics/findMySub")
    Call<BaseEntity<SubSetEntity>> findMySub();

    //商机订阅-保存、编辑
    @POST("v1/app/user/logistics/saveSub")
    Call<BaseEntity> saveSub(@Body SubSetEntity entity);

    //车主订单列表/
    @POST("v1/app/logistics/order/findCarOrderList")
    Call<BaseEntity<ListResponse<List<CarMasterOderEntity>>>> findCarOrderList(@Body Map map);

    //我的订单
    @FormUrlEncoded
    @POST("v1/app/user/logistics/myOfferOrder")
    Call<BaseEntity<ListResponse<List<MyOfferEntity>>>> myOfferOrder(@Field("limit") int limit, @Field("page") int page);

    //货主议价
    @POST("v1/app/logistics/order/carOfferList")
    Call<BaseEntity<ListResponse<List<BargainerBargainingEntity>>>> carOfferList(@Body Map map);

    //同意议价
    @FormUrlEncoded
    @POST("v1/app/logistics/order/SignOrder")
    Call<BaseEntity> signOrder(@Field("id") String id);

    //车主同意报价
    @POST("v1/app/logistics/order/confirmOffer")
    Call<BaseEntity> agreeOffer(@Body Map map);

    //我的报价
    @FormUrlEncoded
    @POST("v1/app/user/logistics/findOfferByGoodsSourceNo")
    Call<BaseEntity<MyOfferEntity>> findOfferByGoodsSourceNo(@Field("goodsSourceNo") String goodsSourceNo);

    //常跑城市设置
    @POST("logistics/my/oftenRouter")
    Call<BaseEntity> saveWay(@Body Map map);

    //获取常跑城市
    @POST("logistics/my/oftenDetail")
    Call<BaseEntity<RunningCityPEntity>> frequentlyUsedWay();

    //我的询价列表
    @FormUrlEncoded
    @POST("v1/app/user/goods/enquiry/myEnquiryList")
    Call<BaseEntity<ListResponse<List<PriceCheckListEntity>>>> getPriceCheckList(@Field("tcatName") String tcatName, @Field("page") int page, @Field("limit") int limit, @Field("status") int status);

    @FormUrlEncoded
    @POST("v1/app/material/buyer/materChoose")
    Call<BaseEntity<List<AttributeViewEntity>>> getAttribute(@Field("id") String id, @Field("areaCode") String areaCode);

    @POST("v1/app/user/goods/concreteAttrs")
    Call<BaseEntity<List<CommonStAttrEntity>>> getStAttribute();

    //询价发布
    @POST("v1/app/user/goods/enquiry/goodsEnquiryPublish")
    Call<BaseEntity> publishPriceCheck(@Body PriceCheckEntity priceCheckEntity);

    //供应商列表
    @POST("v1/app/user/goods/enquiry/goodsEnquirySearchCompany")
    Call<BaseEntity<List<SupplierEntitiy>>> getSupplier(@Body EnquirySearchCompany company);

    //商铺经营-我的报价
    @FormUrlEncoded
    @POST("v1/app/user/goods/quote/myQuoteList")
    Call<BaseEntity<ListResponse<List<ShopMyPriceListEntity>>>> getPriceShop(@Field("status") int status, @Field("page") int page, @Field("limit") int limit, @Field("purchaserName") String purchaserName);

    //商铺经营-我的详情修改
    @FormUrlEncoded
    @POST("v1/app/user/goods/quote/quoteGoodsInfo")
    Call<BaseEntity<ShopPriceInfo>> getQuoteGoodsInfo(@Field("no") String no);

    //商铺经营-我的详情修改
    @POST("v1/app/user/goods/quote/quotePublish")
    Call<BaseEntity> getQuotePublish(@Body List<ShopInfoPublishEntity> shopinfopublishentity);
    //货源上下架

    @POST("v1/app/user/logistics/goodsSourcePutaway")
    Call<BaseEntity> goodsSourcePutaway(@Body Map map);

    //货主确认
    @FormUrlEncoded
    @POST("v1/app/logistics/order/confirm")
    Call<BaseEntity> orderConfirm(@Field("orderNo") String id);

    //车主/货主取消
    @FormUrlEncoded
    @POST("v1/app/logistics/order/cancel")
    Call<BaseEntity> orderCancel(@Field("orderNo") String id);

    //车主/货主删除
    @FormUrlEncoded
    @POST("v1/app/logistics/order/del")
    Call<BaseEntity> orderDel(@Field("orderNo") String id);

    //车主发车
    @FormUrlEncoded
    @POST("v1/app/logistics/order/start")
    Call<BaseEntity> carStart(@Field("orderNo") String id);

    //车主达到
    @FormUrlEncoded
    @POST("v1/app/logistics/order/end")
    Call<BaseEntity> carEnd(@Field("orderNo") String id);

    //货源详情
    @FormUrlEncoded
    @POST("v1/app/logistics/detail")
    Call<BaseEntity<ReleaseGoodsEntity>> getGoodsDetail(@Field("no") String no, @Field("areaCode") String areaCode);
    //加油站编辑

    @POST("v1/app/user/logistics/saveGasStationInfo")
    Call<BaseEntity> editStation(@Body GasStationInfo info);

    //加油站信息
    @POST("v1/app/user/logistics/findGasStationInfo")
    Call<BaseEntity<GasStationInfoEntity>> getStationInfo();

    //油品管理列表
    @FormUrlEncoded
    @POST("v1/app/user/logistics/oilList")
    Call<BaseEntity<ListResponse<List<OilInfoEntity>>>> getOilList(@Field("limit") int limit, @Field("page") int page);

    //油品牌
    @POST("v1/app/user/logistics/getBrand")
    Call<BaseEntity<List<CarriageSelectEntity>>> getBrand();

    //油类型
    @POST("v1/app/user/logistics/getOilTypes")
    Call<BaseEntity<List<CarriageSelectEntity>>> oilType();

    //编辑油品
    @POST("v1/app/user/logistics/saveOil")
    Call<BaseEntity> saveOil(@Body Map map);
    //上下架油品

    @POST("v1/app/user/logistics/updateOilStatus")
    Call<BaseEntity> updateStatus(@Query("id") int id, @Query("state") int state);

    //加油服务列表
    @POST("v1/app/user/logistics/findGasStationInfoList")
    Call<BaseEntity<ListResponse<List<GasListInfoEntity>>>> getGasList(@Body Map entity);

    //地图加油站
    @POST("v1/app/user/logistics/findGasStationInfoMapList")
    Call<BaseEntity<ListResponse<List<GasListInfoEntity>>>> getGasMap(@Body Map entity);

    //油品牌
    @POST("v1/app/user/logistics/getBrand")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getBrandPop();

    //油类型
    @POST("v1/app/user/logistics/getOilTypes")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> oilTypePop();
}
